Skip to content

Conversation

@oech3
Copy link
Contributor

@oech3 oech3 commented Jan 13, 2026

Closes #10200

@oech3 oech3 changed the title Nice huge nice -n huge_num true Jan 13, 2026
@oech3 oech3 force-pushed the nice-huge branch 2 times, most recently from eec8ae2 to ae0c818 Compare January 13, 2026 10:50
@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/shuf/shuf-reservoir (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/sort/sort-stale-thread-mem (passes in this run but fails in the 'main' branch)

@oech3 oech3 force-pushed the nice-huge branch 2 times, most recently from 4ce1311 to 7a75ddd Compare January 13, 2026 15:42
@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/shuf/shuf-reservoir (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/sort/sort-stale-thread-mem (passes in this run but fails in the 'main' branch)

@oech3 oech3 force-pushed the nice-huge branch 2 times, most recently from fae9d13 to 0166306 Compare January 14, 2026 00:47
@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tty/tty-eof (passes in this run but fails in the 'main' branch)

@oech3 oech3 force-pushed the nice-huge branch 3 times, most recently from d7cd76f to 07d3f52 Compare January 17, 2026 16:07
translate!("nice-error-invalid-number", "value" => nstr.clone(), "error" => e),
));
// clamp huge values
let trimmed = nstr.trim();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think moving it into a function could help with readability

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this operation duplicated at somethere?

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 17, 2026

Merging this PR will degrade performance by 26.25%

❌ 8 regressed benchmarks
✅ 274 untouched benchmarks
⏩ 38 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Memory sort_mixed_data[500000] 22.5 MB 27.2 MB -17.15%
Memory sort_ascii_only[500000] 22.2 MB 28.3 MB -21.74%
Memory sort_long_line[160000] 724.4 KB 982.3 KB -26.25%
Memory sort_accented_data[500000] 22.1 MB 28.3 MB -21.78%
Memory sort_key_field[500000] 45.8 MB 51.8 MB -11.46%
Memory cp_large_file[16] 107.6 KB 120 KB -10.34%
Memory du_wide_tree[(5000, 500)] 1.2 MB 1.3 MB -5.39%
Simulation cp_large_file[16] 369.8 µs 382.4 µs -3.3%

Comparing oech3:nice-huge (34c2172) with main (799de29)

Open in CodSpeed

Footnotes

  1. 38 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/tail/follow-name. tests/tail/follow-name is passing on 'main'. Maybe you have to rebase?

@oech3 oech3 force-pushed the nice-huge branch 3 times, most recently from 27be172 to b114e0a Compare January 17, 2026 20:49
@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/basenc/bounded-memory is now passing!


#[test]
fn test_sign_middle() {
new_ucmd!().args(&["-n", "-2+4", "true"]).fails();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the error message?

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/basenc/bounded-memory is now passing!

@oech3 oech3 force-pushed the nice-huge branch 2 times, most recently from 858f4f0 to 7d3c2ad Compare January 17, 2026 21:51
@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/basenc/bounded-memory is now passing!

format!("getpriority: {}", Error::last_os_error()),
));
}
let nice_bound = 50;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard-coded magic number 50 should be a named constant like MAX_NICE_OVERFLOW or similar


#[test]
fn test_nice_huge_negative() {
new_ucmd!().args(&["-n", "-9999999999", "true"]).succeeds(); // permission denied
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Negative overflow test should verify actual niceness value is clamped to expected bound

@oech3 oech3 force-pushed the nice-huge branch 3 times, most recently from 917605c to 34c2172 Compare January 18, 2026 04:36
@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/shuf/shuf-reservoir (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/sort/sort-stale-thread-mem (fails in this run but passes in the 'main' branch)

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tty/tty-eof (passes in this run but fails in the 'main' branch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nice: nice -n 2147483648 true fails

2 participants